package com.bier.fishproject.activity;

import com.bier.fishproject.R;
import com.bier.fishproject.utils.Constant;
import android.annotation.SuppressLint;
import android.os.Bundle;
import android.os.Handler;
import android.view.Window;
/**
 * 开始页面
 * @author Administrator
 *
 */
public class StartActivity extends BaseActivity{

	private Handler handler;
	@SuppressLint("HandlerLeak") protected void onCreate(Bundle arg0) {
		super.onCreate(arg0);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.activity_start);
		handler=new Handler(){
			public void handleMessage(android.os.Message msg) {
				if(msg.what==Constant.ONE){
					startActivity(LoginActivity.class, null);
					StartActivity.this.finish();
				}
				handler.removeCallbacks(run);
			};
		};
		handler.postDelayed(run, 2000);
	}
	
	private Runnable run=new Runnable() {
		public void run() {
			handler.sendEmptyMessage(Constant.ONE);
		}
	};
}
